//
//  TTBeaconRegion.h
//  iBeaconDemo
//
//  Created by CRY on 17/1/5.
//  Copyright © 2017年 eGova. All rights reserved.
//

#import <Foundation/Foundation.h>
@import CoreLocation;

@interface TTBeaconRegion : NSObject

@property (copy, nonatomic, readonly) NSString *name;
@property (strong, nonatomic, readonly) NSUUID *uuid;
@property (assign, nonatomic, readonly) CLBeaconMajorValue majorValue;
@property (assign, nonatomic, readonly) CLBeaconMinorValue minorValue;
@property (assign, nonatomic, readonly) NSString *keyID;
@property (assign, nonatomic) NSInteger rssi;

- (instancetype)initWithName:(NSString *)name
                        uuid:(NSUUID *)uuid
                       major:(CLBeaconMajorValue)major
                       minor:(CLBeaconMinorValue)minor;

- (instancetype)initWithName:(NSString *)name
                        uuid:(NSUUID *)uuid
                       major:(CLBeaconMajorValue)major
                       minor:(CLBeaconMinorValue)minor
                        rssi:(NSInteger)rssi;

- (BOOL)isEqualToCLBeacon:(CLBeacon *)beacon;

- (CLBeaconRegion *)convertToBeaconRegion;

- (NSComparisonResult)compareByRSSI:(TTBeaconRegion *)beacon;

@end
